package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("routes")
public class Routes {

    @Column(name = "id",isKey = true,isAutoIncrement = true,comment = "地址id")
    @TableId(type = IdType.AUTO)
    Long id;


    /**
     * 发货省
     */
    @Column(name = "ori_province",comment = "省")
    private String oriProvince;

    @Column(name = "ori_city",comment = "市")
    private String oriCity;

    @Column(name = "ori_district",comment = "区")
    private String oriDistrict;

    @Column(name = "ori_address_location",comment = "地址经纬度")
    private String oriAddressLocation;

    /**
     * 发货市级区域编码
     */
    @Column(name = "ori_ad_code",comment = "发货市级区域编码")
    private Long oriAdCode;

    /**
     * 收货省
     */
    @Column(name = "dst_province",comment = "省")
    private String dstProvince;

    @Column(name = "dst_city",comment = "市")
    private String dstCity;

    @Column(name = "dst_district",comment = "区")
    private String dstDistrict;

    @Column(name = "dst_address_location",comment = "地址经纬度")
    private String dstAddressLocation;

    /**
     * 收货市级区域编码
     */
    @Column(name = "dst_ad_code",comment = "收货市级区域编码")
    private Long dstAdCode;



    @Column(name = "uid",comment = "用户表id（用于指向用户id）")
    private Long uid;


    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creation_time") // 创建时间
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;

}
